package com.parktech.sun.web.controller;

import com.parktech.sun.domain.service.downloadcenter.ResourceFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * User: Think
 * Date: 11-1-24
 * Time: 上午2:12
 */
@Controller
public class DownloadCenterViewController extends BaseViewController {

    private ResourceFileService resourceFileService;

    @Autowired
    public DownloadCenterViewController(ResourceFileService resourceFileService) {
        this.resourceFileService = resourceFileService;
    }

    @RequestMapping("/downloadcenter")
    public void downloadCenter(Model model) {
        model.addAttribute("files", resourceFileService.listAll());
    }
}
